import java.net.*;

public class AddrTest {
  public static void main(String[] args)
      throws Exception {
    if(args.length != 1) {
      System.err.println(
        "Usage: WhoAmI MachineName");
      System.exit(1);
    }
    InetAddress iAddr =
      InetAddress.getByName(args[0]);
    System.out.println(iAddr);
	
    System.out.println(iAddr.getAddress());

    InetAddress addr = InetAddress.getByName(null);
    System.out.println(addr);
  }
}